package com.project.service.impl;

import com.project.bean.ClientBean;
import com.project.bean.GoodsBean;
import com.project.mapper.IClientMapper;
import com.project.service.IClientService;
import com.project.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

@Service
@Transactional
public class ClientServiceImpl implements IClientService {
    @Autowired
    private IClientMapper clientMapper;
    @Override
    public List<ClientBean> findByYear(String year) {
        List<ClientBean> clientBeans =  clientMapper.findByYer(year);
        List<ClientBean> clientBean=new ArrayList<>();
        for (ClientBean c:clientBeans){
            if (c!=null){
                clientBean.add(c);
            }
        }

        return clientBean ;
    }

    @Override
    public List<Integer> findYer() {
        return clientMapper.findYer();
    }
}
